Skip to content

feat(backups): due-cohort export pass + run record with retry list (#13456 slice 2) - #14211

Open
dezren39 wants to merge 1 commit into
mainfrom
oc-code-06/13456-slice2
Open

dezren39 wants to merge 1 commit into
mainfrom
oc-code-06/13456-slice2

Conversation

@dezren39

@dezren39 dezren39 commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Slice 2 of #13456 (mesh leg, class B). Slice 1 (cohort planner) landed in #13505.

What

  • `pkgs/cold-store-reaper/scripts/turso-mesh-export-pass.py`: takes the planner's dry-run plan, runs one read-only exporter per database in the due cohort (plus retries carried from a previous run record), and writes a machine-readable run record with per-DB snapshot ids and export times.
  • A database whose export fails, is missing, or returns unparseable output lands in the record's `retry` list with its reason. Exit 1 when the list is non-empty.
  • Class-A names never reach the exporter.

Not in this slice

No R2 writes, no credentials, no schedule, no registry row. Watchdog, restore drills and schedule wiring are later slices.

Evidence

  • `tests/test_turso_mesh_export_pass.py` (6 tests): due-cohort export from planner output; a misnamed/removed DB and a garbled-output DB both surface in the retry list; a previous retry list is carried into the next pass; class-A never exported; strict usage errors exit 2; missing exporter is a recorded miss.
  • `python3 -I -m unittest discover -s pkgs/cold-store-reaper/tests -p 'test_turso_mesh_*.py'`: 39 tests OK.

Refs #13456

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-24T08:30:45Z",
    "session_id": "ses_e5df35a384cffeJkPqd70GBr3U",
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/.local/share/opencode/worktree/7c7733/oc-code-06-13456-slice2",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/.local/share/opencode/worktree/7c7733/oc-code-06-13456-slice2",
      "repo": "developing-today/code",
      "branch": "oc-code-06/13456-slice2",
      "sha": "851171d26a99cb75e2e14e8467ca79a222c586ba"
    },
    "auth_subject": "oc-code-08",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Proof this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…13456 slice 2)

Consumes the slice-1 planner plan and runs one read-only exporter per
database in the due cohort, plus any retries carried from a previous run
record. Each database lands in the run record as exported (snapshot id,
export time) or in the retry list with its reason; a miss is never a
silent skip. Exit 1 when the retry list is non-empty so the run is loud.

No R2 writes, no credentials, no schedule: those are later slices.
@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 57 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dd8ca2ff-dc09-48f2-b0db-4db96754b0b4
Commits

Reviewing files that changed from the base of the PR and between ca1346a and 851171d.

Files selected for processing: 2

  • pkgs/cold-store-reaper/scripts/turso-mesh-export-pass.py
  • pkgs/cold-store-reaper/tests/test_turso_mesh_export_pass.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant